package com.itheima.service;

<<<<<<< Updated upstream
import com.itheima.domain.Account;
=======
>>>>>>> Stashed changes
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

<<<<<<< Updated upstream
import java.util.List;
//对当前接口的所有方法添加事务
@Transactional(isolation = Isolation.DEFAULT)
=======
import java.io.IOException;
//如果写在接口上，表明该接口中所有方法，均有此事务
/*@Transactional(
        readOnly = false,
        timeout = -1,
        isolation = Isolation.DEFAULT,
        rollbackFor = {java.lang.ArithmeticException.class, IOException.class},
        noRollbackFor = {},
        propagation = Propagation.REQUIRED
)*/
>>>>>>> Stashed changes
public interface AccountService {

    /**
     * 转账操作
     * @param outName     出账用户名
     * @param inName      入账用户名
     * @param money       转账金额
     */
<<<<<<< Updated upstream
    //对当前方法添加事务，该配置将替换接口的配置
    @Transactional(
        readOnly = false,
        timeout = -1,
        isolation = Isolation.DEFAULT,
        rollbackFor = {},   //java.lang.ArithmeticException.class, IOException.class
        noRollbackFor = {},
        propagation = Propagation.REQUIRED
        )
=======
    @Transactional(
            readOnly = false,
            timeout = -1,
            isolation = Isolation.DEFAULT,
            rollbackFor = {java.lang.ArithmeticException.class, IOException.class},
            noRollbackFor = {},
            propagation = Propagation.REQUIRED
    )
>>>>>>> Stashed changes
    public void transfer(String outName, String inName, Double money);

}
